package mapper

import (
	"administrator/app/model"
	"database/sql"
)

type OrgManageMapper struct {
	GetAllRole func(any) ([]*model.Role, int64, error)

	AllOrg func(any) ([]*model.Org, error)

	// 分页查询 子组织
	GetOrgChild func(any) ([]*model.Org, int64, error)

	AuthExist func(any) (int, error)
	OUExist   func(any) (int, error)
	AddRole   func(any) (int64, int64, error)
	Del       func(any) error

	AddUser func(any, *sql.Tx) (int64, int64, error)

	AddUserRoles func(any, *sql.Tx) error

	SetUserDefaultOR func(any, *sql.Tx) error

	SetUserOrg func(any, *sql.Tx) error

	UpdateDefaultOrgRole func(any, *sql.Tx) error

	CreateOrg func(any) error

	DelChildOrg func(any) error

	ExistUser func(any) (int64, error)

	OrgDelUser func(any, *sql.Tx) error

	OrgDelUserRoles func(any, *sql.Tx) error

	OrgDelUserDefaultInfo func(any, *sql.Tx) error

	OrgUser func(any) ([]*model.Account, int64, error)

	IsAdmin func(any) ([]int, error)

	IsParentOrg func(any) ([]int, error)

	SelectUserRole func(any) ([]*model.Role, error)

	SelectMenuAuth func(any) ([]*model.MenuRouter, error)

	SelectFuncAuth func(any) ([]*model.FuncRouter, error)

	SelectUserMenu func(any) ([]*model.RoleUserMenuAuth, error)
	SelectUserFunc func(any) ([]*model.RoleUserFuncAuth, error)

	InsertUserRole func(any) error

	DeleteUserRole func(any) error

	InsertUserMenuAuth func(any, *sql.Tx) error

	DeleteUserMenuAuth func(any, *sql.Tx) error

	InsertUserFuncAuth func(any, *sql.Tx) error

	DeleteUserFuncAuth func(any, *sql.Tx) error
}
